package com.tjb.controller;

import com.tjb.service.CsvService;
import com.tjb.service.TransitionService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.List;

/**
 * @author tjb
 * @version 1.0
 * @date 2024/7/10 20:41
 */
@RestController
public class TransitionController {
    @Resource
    private CsvService csvService;
    @Resource
    private TransitionService transitionService;

    @PostMapping("/csvToTsFile")
    public boolean parseCsvToTsFile(File file){
        try {
            return transitionService.csvToTsFile(file);
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}
